import config from '../../utils/config';
import apiCreator from '../../utils/apiCreator';

const api = apiCreator();

export default {
  // 获取存款账号表格信息
  getAccountData: (query) => api.post(`${config.interfaces.type5}portfolio-server/bankAccount/getBankAccount`, query),
  // 获取存储总行下拉列表
  getbankAccountList: (query) => api.get(`${config.interfaces.type5}instrument-server/depositBank/queryBank`, query),
  // 新增存款账号
  addAccount: (query) => api.post(`${config.interfaces.type5}portfolio-server/bankAccount/saveOrUpdateAccount`, query),
  // 根据Id编辑存款账号
  editAccountById: (query) => api.post(`${config.interfaces.type5}portfolio-server/bankAccount/saveOrUpdateAccount`, query),
  // 根据Id查询账号历史记录表格数据
  getHistoryById: (query) => api.get(`${config.interfaces.type5}portfolio-server/bankAccount/getAccountHistory`, query),
  // 根据Id删除存款账号
  deleteAccountById: (query) => api.get(`${config.interfaces.type5}portfolio-server/bankAccount/deleteBankAccount`, query),
};
